//
//  FlutterPage.swift
//  
//
//  Created by 孙长坦 on 2022/3/28.
//

import Foundation
import UIKit
import LibService

open class FlutterPage: Page {
    
    open override class var type: String {
        return "flutter"
    }

    private unowned var pageController: PageController?
    
    override open var viewController: PageController? {
        if pageController != nil {
            return pageController
        }
        
        guard let pageController = ServiceManager.shared.flutterService?
            .pageController(page: self) as? PageController else {
            return nil
        }
        
        self.pageController = pageController

        return pageController
    }
}
